import React from 'react'

const Login = React.lazy(() => import('../views/login'))
const Layout = React.lazy(() => import('../views/layout'))
const OrderList = React.lazy(() => import('../views/layout/orderList'))
const Detail = React.lazy(() => import('../views/layout/detail'))

export interface IRoute {
	path: string
	element: React.FC,
	children?: IRoute[]
}

const routes: IRoute[] = [{
	path: '/login',
	element: Login
},
{
	path: '/',
	element: Layout,
	children: [{
		path: '/order/list',
		element: OrderList
	}, {
		path: '/detail',
		element: Detail
	}]
}]


export default routes